package com.smart.manager.product.entities.body;

import com.smart.common.entities.core.BaseSearch;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;


/**
 * 猪仔配置 - 品种管理
 * @author leo
 * @date 2023/09/07
 */
public class RPigBreed {

    @Data
    @EqualsAndHashCode(callSuper = true)
    @ApiModel("RPigBreed1")
    public static class SearchBody extends BaseSearch {

        @ApiModelProperty("品种代码")
        private String code;

        @ApiModelProperty("品种名称")
        private String name;

    }


    @Data
    @ApiModel("RPigBreed2")
    public static class EditBody  implements Serializable {

        @ApiModelProperty("品种代码")
        @NotBlank(message = "品种代码 不能为空")
        private String code;

        @ApiModelProperty("品种名称")
        @NotBlank(message = "品种名称 不能为空")
        private String name;

        @ApiModelProperty("是否有机")
        @NotNull(message = "是否有机 不能为空")
        private Boolean isOrganic = false;

        @ApiModelProperty("品种描述")
        @NotBlank(message = "品种描述 不能为空")
        private String describe;

        @ApiModelProperty("品种图片")
        private String image;



        @ApiModelProperty("显示排序")
        @Min(value = 0,message = "显示排序 不能小于0")
        @Max(value = 999,message = "显示排序 不能大于999")
        private Integer sort;
    }


}
